@import 'commons.less';

.tui-style-label {
	position: relative;
  font-size: 16px;
  line-height: 20px;
  font-weight: 700;
  color: #424242;
  cursor: default;
  padding: 2px 22px 2px 5px;
}

tui\:form {
	display: block;
	position: relative;
	padding: 10px;
	padding-bottom: 20px;
	margin: 0 auto;
	background: white;
	min-width: 250px;

	&:after {
		content: " ";
		display: block;
		clear: both;
	}

	&:focus {
		outline: 1px dashed #bbb;
	}

	tui\:grid {
		height: 150px;
	}

	.tui-form-item-placeholder {
		background-color: #f0f0f0;
		vertical-align: top;
		&.tui-form-item-pull-left {
			float: left;
		}

		&.tui-form-item-pull-right {
			float: right;
		}
	}

	&>div.tui-form-error {
		padding: 20px;
		color: red;
		&:before {
			content: "ERROR";
			font-weight: bold;
			display: block;
			padding-bottom: 20px;
		}
	}

	div.tui-form-item-container {
		padding: 10px 10px;
		width: 200px;
		display: inline-block;
		vertical-align: top;
		position: relative;
		-webkit-box-sizing: border-box !important;
		box-sizing: border-box !important;

		> tui\:calendar {
			max-width: none;
			min-width: 0;
			margin: 2px;
			> table {
				table-layout: fixed;
			}
		}

		&>* {
			display: block !important;
			width: auto !important;
		}
		&>.tui-hidden {
			display: none !important;
		}

		&>div.tui-form-item-mask {
			position: absolute;
			cursor: default;
			display: none !important;
			left: 0;
			top: 0;
			right: 0;
			bottom: 0;
			background-color: #f5f5f5;
			.opacity(0);
			z-index: 21;
			>span {
				position: absolute;
				right:3px;
				top:3px;
				background-color: #f55;
				color: white;
				width: 40px;
				height: 18px;
				font-size: 11px;
				font-weight: bold;
				text-align: center;
				line-height: 18px;
			}
		}
		&.tui-form-in-design {
			&>div.tui-form-item-mask {
				display: block !important;
			}
			&:hover {
				background-color: #f5f5f5;
				&>div.tui-form-item-mask {
					.opacity(0.3);
				}
			}
		}
		&.tui-form-item-selected {
			background-color: #eee;
			&:hover {
				background-color: #eee;
			}
			&>div.tui-form-item-mask {
				.opacity(0.4);
				background-color: #eee;
				border: 1px dashed #000;
			}
		}

		&>div.tui-form-item-toolbar {
			position: absolute;
			bottom: -15px;
			left: 12px;
			.shadow(1px, 1px, 2px);
			z-index: 30;
			background-color: #444;
			transition: opacity .3s;
			padding: 0px 2px;
			tui\:button {
				padding:7px 9px;
				margin: 0px 0px;
				font-size: 12px;
				font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
				font-weight: bold;
				background-color: transparent;
				color: #ccc;
				height: auto;
				border: none;
				line-height: 1;
				min-width: 16px;
			}
			span {
				display: inline-block;
				height: 10px;
				width: 1px;
				background-color: #666;
				vertical-align: middle;
				margin: 0 3px;
			}
		}

		&.tui-form-item-moving>div.tui-form-item-toolbar {
			display: none !important;
		}

		&>hr.tui-form-line-label {
			margin: 0px;
			margin-top: 5px;
		}


		& > tui\:button-group {
			>tui\:radio,>tui\:check {
				height: inherit;
				line-height: 30px;
				> span {
					line-height: 20px;
					vertical-align: middle;
					text-align: left;
					display: inline-block;
					white-space: initial;
					word-break: break-all;
					word-wrap: break-word;
				}
			}
		}

		& > tui\:button-group.tui-form-group-align-vertical > * {
			display: block;
			display: flex;
			align-items: center;
			width: auto;
			float: none;
			text-align: left;
		}

		&.tui-form-item-newline {
			clear: both;
			display: block !important;
		}

		&.tui-form-item-pull-left {
			float: left;
		}

		&.tui-form-item-pull-right {
			float: right;
		}

		div.tui-form-item-label {
			position: relative;
			font-size: 16px;
			line-height: 20px;
			font-weight: bold;
			color: #424242;
			cursor: default;
			padding: 2px 5px;
			padding-right: 22px;

			&.tui-form-item-required:before {
				margin-right: 4px;
				color: red;
				// content: "\2217";
				// line-height: 0px;
				// font-size: 20px;
				content: " ";
				.asterisk();
				// vertical-align: middle;
			}
			>span {
				position: absolute;
				top: 5px;
				right: 5px;
				.icon-base();
				font-size: 18px;
				color: @iconInfoColor;
				&:before {
					.fa-question-circle();
				}
			}
			&.tui-form-section-label {
				color: #039be5;
				word-break: break-all;
				word-wrap: break-word;
				&.tui-form-item-link {
					padding: 5px;
					padding-left: 40px;
					text-indent: -40px;
					text-decoration: underline;
					cursor: pointer;
					font-size: 16px !important;
					font-weight: normal;
					&:hover {
						background-color: #f5f5f5;
					}
					&.tui-disable {
						color: #555;
						cursor: default;
						&:hover {
							background-color: none;
						}
					}
					&:before {
						text-indent: 0px;
						width: 40px;
						text-align: center;
						margin: 0px;
						color: black;
						.icon-base();
						.fa-link();
					}
				}
			}
			&.tui-form-item-emphasize {
				color: red;
			}
		}

		div.tui-form-text-view-content {
			padding: 2px 5px;
			word-break: break-all;
			word-wrap: break-word;
			white-space: pre-line;
		}

		&.tui-text-view-inline>div.tui-form-item-label {
			flex: 0.3;
		}
		&.tui-text-view-inline>div.tui-form-text-view-content {
			flex: 0.7;
		}

		&.tui-form-item-size-full {
			display: block !important;
			width: auto !important;
			float: none;
			clear:both;
		}
		&.tui-form-item-exceed {
			display: block !important;
			width: auto !important;
			float: none;
			clear:both;
		}

		&.tui-text-view-inline {
			display: flex !important;
			flex-direction: row;
			align-items: stretch;
			border-bottom: 1px solid #ddd;
		}

		&.tui-form-item-unavailable,&.tui-hidden {
			display: none !important;
		}

		div.tui-form-notify-bar {
			padding: 5px;
			color: red;
			font-weight: bold;
		}

		&.tui-form-section-newline {
			padding:0;
			> * {
				display: none !important;
			}
		}
		&.tui-form-section-folder {
			div.tui-form-item-label:hover {
				background-color:#f8f8f8;
				cursor: pointer;
			}
			div.tui-form-item-label:before {
				font-size: 16px;
				color: #aaa;
				.icon-base();
				margin-right: 10px;
				.fa-minus-square();
			}
			&.tui-folded div.tui-form-item-label:before {
				.fa-plus-square();
			}
		}
	}

	>div.tui-form-new-item-box {
		margin: 10px 10px;
		width: 190px;
		height: 80px;
		line-height: 80px;
		text-align: center;
		display: inline-block;
		vertical-align: top;
		position: relative;
		border: 2px dashed #ccc;
		color: #ccc;
		cursor: pointer;
		.icon-base();
		font-size: 24px;
		&:before {
			.fa-plus();
		}
	}

}

div.tui-form-new-item-menu {
	max-width: 345px;
	padding: 5px;
	> hr {
		margin: 5px 0;
	}
	> div {
		position: relative;
		display: inline-block;
		width: 85px;
		height: 70px;
		line-height: 60px;
		text-align: center;
		color: #444;
		cursor: pointer;
		> span {
			display: inline-block;
			font-size: 20px;
		}
		> div {
			position: absolute;
			left: 0;
			bottom: 0;
			right: 0;
			overflow: hidden;
			text-overflow: ellipsis;
			height: 30px;
			line-height: 30px;
			color: #777;
		}
		&:hover {
			background-color: #f0f0f0;
		}
	}
}

tui\:form.tui-panel {
 		margin: 20px;
}

tui\:dialog>.tui-content tui\:form {
	width: 1060px;
	padding: 0;
	&.tui-form-design-mode {
		padding-bottom: 20px;
	}
}


@media (max-width: 1120px) {
	tui\:dialog>.tui-content tui\:form {
		width: 800px;
	}
}

@media (max-width: 860px) {
	tui\:dialog>.tui-content tui\:form {
		width: 540px;
	}
}

tui\:form.tui-form-max-1 {
	max-width: 	280px;
}

tui\:form.tui-form-property-form,tui\:form.tui-form-max-2 {
	max-width: 	540px;
}

tui\:form.tui-form-max-3 {
	max-width: 	800px;
}

tui\:form.tui-form-max-4 {
	max-width: 	1060px;
}

tui\:form.tui-form-max-5 {
	max-width: 	1320px;
}

@media (max-width: 580px) {
	tui\:form.tui-panel {
		margin: 0px;
	}
	tui\:form {
		padding: 0px 0px 20px;
	}
	tui\:dialog>.tui-content tui\:form {
		width: auto;
		&.tui-panel {
			margin: 0px;
		}
		div.tui-form-item-container {
			width: auto;
			display: block;
			padding: 10px 0;
		}
	}
}

tui\:form.tui-size-2 {
	width: auto;

	div.tui-form-item-container {
		display: inline-block;
		width: 50%;
		&.tui-form-item-size-2,&.tui-form-item-size-3,&.tui-form-item-size-4,&.tui-form-item-size-5 {
			width: 100%;
		}
	}
}

tui\:form.tui-size-3 {
	width: auto;
	div.tui-form-item-container {
		display: inline-block;
		width: 33.3%;
		&.tui-form-item-size-2 {
			width: 66.6%;
		}
		&.tui-form-item-size-3,&.tui-form-item-size-4,&.tui-form-item-size-5 {
			width: 99.9%;
		}
	}
}

tui\:form.tui-size-4 {
	width: auto;
	div.tui-form-item-container {
		width: 25%;
		&.tui-form-item-size-2 {
			width: 50%;
		}
		&.tui-form-item-size-3 {
			width: 75%;
		}
		&.tui-form-item-size-4,&.tui-form-item-size-5 {
			width: 100%;
		}
	}
}

tui\:form.tui-size-5 {
	width: auto;
	div.tui-form-item-container {
		width: 20%;
		&.tui-form-item-size-2 {
			width: 40%;
		}
		&.tui-form-item-size-3 {
			width: 60%;
		}
		&.tui-form-item-size-4 {
			width: 80%;
		}
		&.tui-form-item-size-5 {
			width: 100%;
		}
	}
}

tui\:form.tui-size-6 {
	width: auto;
	div.tui-form-item-container {
		width: 16.65%;
		&.tui-form-item-size-2 {
			width: 33.3%;
		}
		&.tui-form-item-size-3 {
			width: 49.95%;
		}
		&.tui-form-item-size-4 {
			width: 66.6%;
		}
		&.tui-form-item-size-5 {
			width: 83.25%;
		}
	}
}

tui\:form.tui-size-1 {
	width: auto;
	div.tui-form-item-container {
		width: auto;
		display: block;
		float: none;
	}
}

tui\:button-group.tui-tab.tui-form-properties-tab {
	margin-bottom: 20px;
	>tui\:radio {
		font-size: 18px;
	}
}
